<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php echo $facebook->html(); ?>
<head>
    <?php echo $this->Html->charset(); ?>
    <title>
        <?php __('Didded'); ?>
        <?php echo $title_for_layout; ?>
    </title>        
    <?php
    echo $this->Html->meta('icon');
    echo $this->Html->css(array('cake.generic', 'jNice', 'jquery.jscrollpane', 'nivo-slider', 'template', 'jquery-ui'));
    ?>
    <script type="text/javascript">
        baseUrl="<?php echo Configure::read("baseUrl"); ?>";
    </script>
    <?php
    echo $this->Html->script(array('jquery', 'jquery.main', 'smartrollover', 'jNice', 'jquery.jscrollpane.min', 'jquery.mousewheel', 'jquery-ui.min'));
    echo $scripts_for_layout;
    ?>
    <script type="text/javascript">
        jQuery.noConflict();
        jQuery(document).ready(function() {                               
            jQuery(".createPopup").click(function(e){
                e.preventDefault();
                showPop(this);
            });                 
            jQuery(document).keypress(function(a){
                if((a.keyCode==27) && (popupStatus==1)){
                    disablePopup();
                }
            });
            jQuery("a.closeOption").click(function(){
                disablePopup();
                return false});
            jQuery('.scroll-pane, .dayView').jScrollPane({                    
                verticalDragMaxHeight: 44,
                verticalTrackHeight : 300
            });
            jQuery('.textScroller').jScrollPane({
                verticalDragMaxHeight: 18	
            });
            jQuery('.jidoList, .programmScroll, .inboxScroller').jScrollPane({ 
                verticalDragMaxHeight: 44	
            });                
            jQuery("#accordion").accordion();               
        });            
    </script>       
</head>
<body> 


    <div class="wrapper inside-wrapper"> 
        <!--header-->
        <div class="inside-header">
            <h1 class="site-title"><a href="<?php echo Configure::read('baseUrl'); ?>">Didded</a></h1>
            <h2 class="user-title"><?php echo $session->read('Auth.User.name'); ?></h2>
            <div class="search-box">
                <form action="#">
                    <p>
                        <input type="text" class="keyword" value="search" onfocus="if(this.value=='search') this.value=''" onblur="if(this.value=='') this.value='search'" />
                    </p>
                </form>
            </div>
            <a href="javascript:void(0);" class="request-jido">request a jido</a> 
            <?php //echo $this->Html->link("sign out", "/users/logout/", array('class' => "login-status")); ?>    
            <div class="login-status">
                <?php
                echo $facebook->logout(array('redirect' => array('controller' => 'users', 'action' => 'logout'),'label' => 'Sign Out'));
                ?>
            </div>
            <div class="dididt-no"></div>
        </div>
        <!--header--> 
        <div id="content">
            <?php echo $this->Session->flash(); ?>
            <?php echo $content_for_layout; ?>
            <?php echo $facebook->init(); ?> 
        </div>
        <!--/content--> 

        <!--footer-->
        <div class="footer-inside">
            <ul class="footer-nav">
                <li><a href="<?php echo Configure::read('baseUrl'); ?>">home</a></li>
                <li><a href="<?php echo Configure::read('baseUrl'); ?>pages/contact">contact</a></li>
                <li><a href="<?php echo Configure::read('baseUrl'); ?>pages/about_us">about</a></li>
                <li><a href="<?php echo Configure::read('baseUrl'); ?>pages/faq">FAQ</a></li>
                <li><a href="<?php echo Configure::read('baseUrl'); ?>pages/terms_conditions">terms</a></li>
                <li><a href="<?php echo Configure::read('baseUrl'); ?>pages/privacy">privacy</a></li>
                    <?php if ($session->read('Auth.User.id')) { ?>
                    <li>
                        <?php echo $facebook->logout(array('redirect' => array('controller' => 'users', 'action' => 'logout'), 'label' => 'Sign Out')); ?>
                         <!--<a href="<?php echo Configure::read('baseUrl'); ?>users/logout">sign out</a>-->
                    </li>                        
                <?php } else { ?>
                         <li><!--<a href="<?php echo Configure::read('baseUrl'); ?>users/login" title="Login Form">sign in</a>-->
                        <?php echo $facebook->login(array('show-faces' => false, 'perms' => 'email,read_stream,publish_stream')); ?>
                    </li>
                <?php } ?>

            </ul>
        </div>
        <!--/footer-->
        <!--Popup Zone -->
        <span class="arrowInd arrowLeftSide" style="display:none;">&nbsp;</span>
        <div class="popupBg">&nbsp;</div>
        <div class="popupWrapper" id="create-profile-popup" style="display:none;">
            <a href="javascript:void(0)" class="closeOption">&nbsp;</a>                
            <span class="arrowInd arrowTopSide" style="display:none;">&nbsp;</span>
            <div class="popupTitleBar"><div class="popupTitleRight"><div></div></div></div>
            <div class="popupContent">
                <div class="popupYbgRight">
                    <div class="popupX">

                    </div>
                </div>
            </div>
            <div class="popupBottomBar"><div class="popupBottomRight"><div>&nbsp;</div></div></div>
        </div>      

        <?php echo $this->element('sql_dump'); ?>
</body>
</html>